package org.layui.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * 获取用户角色列表 ——— DAO（略）
 */
@WebServlet("/api/user/level")
public class LevelServlet extends BaseServlet{
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        // DAO（略）
        List<String> list = new ArrayList<>() ;
        list.add("会员");
        list.add("管理员");
        list.add("超级管理员");

        // 响应客户端
        print(resp, successJson(list));
    }
}
